package org.luxor.digital.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.commons.core.utils.BeanUtils;
import org.luxor.digital.entity.SysDictionaryEntity;
import org.luxor.digital.mapper.SysDictionaryMapper;
import org.luxor.digital.service.ISysDictionaryService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 字典表
 *
 * @author Mark @date 2020-07-26 14:19:09
 */
@Service("sysDictionaryService")
public class SysDictionaryServiceImpl extends ServiceImpl<SysDictionaryMapper, SysDictionaryEntity> implements ISysDictionaryService {

    @Override
    public IPage<SysDictionaryEntity> page(IPage<SysDictionaryEntity> page, Map search) {
        SysDictionaryEntity query = BeanUtils.toObject(SysDictionaryEntity.class, search);
        return super.page(page, Wrappers.query(query));
    }
}
